<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/12
 * Time: 10:11
 */
namespace app\api\controller\v1;

use app\api\controller\BaseController;

class YanzhengController extends BaseController
{

    public function yanzheng($request,$yanzhengqi)
    {
        //验证请求方式
        $method = $request->method();
        if (!($method == "POST"))
        {
            return json(['code'=>10004,'msg'=>'请求方式错误','data'=>'']);
        }

        //验证器
        $param = $request->param();
        $result = $this->validate($param,$yanzhengqi);
        if(true !== $result){
            // 验证失败 输出错误信息
            return  json(['code'=>10002,'msg'=> $result,'data'=>'']);
        }


    }


}